package com.anry.weatherforecast.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 天气实况响应数据模型
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class WeatherConditionResponse {
    private Integer code;
    private String msg;
    private Rc rc;
    private WeatherData data;
    
    // getters and setters
    public Integer getCode() { return code; }
    public void setCode(Integer code) { this.code = code; }
    
    public String getMsg() { return msg; }
    public void setMsg(String msg) { this.msg = msg; }
    
    public Rc getRc() { return rc; }
    public void setRc(Rc rc) { this.rc = rc; }
    
    public WeatherData getData() { return data; }
    public void setData(WeatherData data) { this.data = data; }
    
    @Override
    public String toString() {
        return "WeatherConditionResponse{code=" + code + ", msg='" + msg + '\'' + 
               ", rc=" + rc + ", data=" + data + '}';
    }
    
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Rc {
        private Integer c;
        private String p;
        
        public Integer getC() { return c; }
        public void setC(Integer c) { this.c = c; }
        
        public String getP() { return p; }
        public void setP(String p) { this.p = p; }
        
        @Override
        public String toString() {
            return "Rc{c=" + c + ", p='" + p + '\'' + '}';
        }
    }
    
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class WeatherData {
        private City city;
        private Condition condition;
        
        public City getCity() { return city; }
        public void setCity(City city) { this.city = city; }
        
        public Condition getCondition() { return condition; }
        public void setCondition(Condition condition) { this.condition = condition; }
        
        @Override
        public String toString() {
            return "WeatherData{city=" + city + ", condition=" + condition + '}';
        }
    }
    
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class City {
        @JsonProperty("cityId")
        private Long cityId;
        
        private String counname;
        private String name;
        private String pname;
        
        public Long getCityId() { return cityId; }
        public void setCityId(Long cityId) { this.cityId = cityId; }
        
        public String getCounname() { return counname; }
        public void setCounname(String counname) { this.counname = counname; }
        
        public String getName() { return name; }
        public void setName(String name) { this.name = name; }
        
        public String getPname() { return pname; }
        public void setPname(String pname) { this.pname = pname; }
        
        @Override
        public String toString() {
            return "City{cityId=" + cityId + ", counname='" + counname + '\'' + 
                   ", name='" + name + '\'' + ", pname='" + pname + '\'' + '}';
        }
    }
    
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Condition {
        private String condition;
        private String conditionId;
        private String humidity;
        private String icon;
        private String pressure;
        private String realFeel;
        private String sunRise;
        private String sunSet;
        private String temp;
        private String tips;
        private String updatetime;
        private String uvi;
        private String windDir;
        private String windLevel;
        private String windSpeed;
        
        public String getCondition() { return condition; }
        public void setCondition(String condition) { this.condition = condition; }
        
        @JsonProperty("conditionId")
        public String getConditionId() { return conditionId; }
        public void setConditionId(String conditionId) { this.conditionId = conditionId; }
        
        public String getHumidity() { return humidity; }
        public void setHumidity(String humidity) { this.humidity = humidity; }
        
        public String getIcon() { return icon; }
        public void setIcon(String icon) { this.icon = icon; }
        
        public String getPressure() { return pressure; }
        public void setPressure(String pressure) { this.pressure = pressure; }
        
        @JsonProperty("realFeel")
        public String getRealFeel() { return realFeel; }
        public void setRealFeel(String realFeel) { this.realFeel = realFeel; }
        
        @JsonProperty("sunRise")
        public String getSunRise() { return sunRise; }
        public void setSunRise(String sunRise) { this.sunRise = sunRise; }
        
        @JsonProperty("sunSet")
        public String getSunSet() { return sunSet; }
        public void setSunSet(String sunSet) { this.sunSet = sunSet; }
        
        public String getTemp() { return temp; }
        public void setTemp(String temp) { this.temp = temp; }
        
        public String getTips() { return tips; }
        public void setTips(String tips) { this.tips = tips; }
        
        public String getUpdatetime() { return updatetime; }
        public void setUpdatetime(String updatetime) { this.updatetime = updatetime; }
        
        public String getUvi() { return uvi; }
        public void setUvi(String uvi) { this.uvi = uvi; }
        
        @JsonProperty("windDir")
        public String getWindDir() { return windDir; }
        public void setWindDir(String windDir) { this.windDir = windDir; }
        
        @JsonProperty("windLevel")
        public String getWindLevel() { return windLevel; }
        public void setWindLevel(String windLevel) { this.windLevel = windLevel; }
        
        @JsonProperty("windSpeed")
        public String getWindSpeed() { return windSpeed; }
        public void setWindSpeed(String windSpeed) { this.windSpeed = windSpeed; }
        
        @Override
        public String toString() {
            return "Condition{condition='" + condition + '\'' + 
                   ", conditionId='" + conditionId + '\'' + 
                   ", humidity='" + humidity + '\'' + 
                   ", icon='" + icon + '\'' + 
                   ", pressure='" + pressure + '\'' + 
                   ", realFeel='" + realFeel + '\'' + 
                   ", sunRise='" + sunRise + '\'' + 
                   ", sunSet='" + sunSet + '\'' + 
                   ", temp='" + temp + '\'' + 
                   ", tips='" + tips + '\'' + 
                   ", updatetime='" + updatetime + '\'' + 
                   ", uvi='" + uvi + '\'' + 
                   ", windDir='" + windDir + '\'' + 
                   ", windLevel='" + windLevel + '\'' + 
                   ", windSpeed='" + windSpeed + '\'' + '}';
        }
    }
}
